package org.tinygroup.weblayer.webcontext.parser.impl;

import javax.servlet.http.HttpServletRequest;

import org.tinygroup.weblayer.webcontext.parser.upload.ParameterValueFilter;

public class EmptyToNullParameterValueFilter implements ParameterValueFilter {

	@Override
	public boolean isFiltering(HttpServletRequest request) {
		return true;
	}

	@Override
	public String filter(String key, String value, boolean isHtml) {
		if("".equals(value)){
			return null;
		}
		return value;
	}

}
